package edu.sctu.practice.class01.renpingan.test01.mytime;

/**
 * Created by Administrator on 2015/10/15.
 */
public class MyTime {
    private int hour;
    private int minute;
    private int second;

    public MyTime(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;

    }


    public void Diaplay(){
        System.out.println("现在时间为："+hour+":"+minute+":"+second);
    }

    public int addSecond(int sec){
        return second = second + sec;

    }
    public int addMinute(int min){
        return minute = minute + min;

    }

    public int addHour(int hou){
        return hour = hour + hou;

    }
    public int subSecond(int sec){
        return second = second - sec;

    }
    public int subMinute(int min){
        return minute = minute - min;

    }
    public int subHour(int huo){
        return hour = hour - huo;

    }
}

